const { ListNode } = require('./base')

const trainingPlan = function (head, cnt) {
  let fast = head
  let slow = head
  let k = cnt
  while (k > 0) {
    fast = fast.next
    k--
  }
  while (fast) {
    fast = fast.next
    slow = slow.next
  }
  return slow
}
